package myschool.myshchool15.homework;

import java.util.Scanner;

public class MemberldAmount {
    /**
     * 会员金额
     * @param args
     */
    public static void main(String[] args){
        Scanner input = new Scanner(System.in);
        System.out.println("请输入是否是会员：是（y）/否（其他字符）");
        String yes = input.next();
        if(yes == "y" || yes.equals("y")){
            System.out.println("请输入购物金额：");
            int number = input.nextInt();
            if(number > 200){
                System.out.println("实际支付："+number*0.75);
            }else{
                System.out.println("实际支付："+number*0.8);
            }

        }else{
            System.out.println("请输入购物金额：");
            int number = input.nextInt();
            if(number > 100){
                System.out.println("实际支付："+number*0.9);
            }else{
                System.out.println("实际支付："+number);
            }

        }
    }
}
